package com.slien.vt.web;

import com.slien.vt.orm.domain.User;
import com.slien.vt.orm.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/user")
public class TestController  {

    @Autowired
    private UserMapper mapper;

    @RequestMapping("/list")
    public @ResponseBody List<User> getUserList(){
        return mapper.selectUser();
    }
}
